<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>数组遍历</title>
</head>
<body>
    
    <script>
    
       /* var ary = [1,2,3,4,5,6,7,8,9];

       var result1 = ary.every(item => item>5)

       var result2 = ary.some(item => item>5);

       var result3 = ary.filter(item=>item>5);

       var result4 = ary.map(item => item*10);

       var result5 = ary.forEach(item => console.log(this),ary);

       var result6 = ary.includes(2);

       console.log(`result6${result6}`);

       console.log(result5);

       console.log(result4); // -> [10, 20, 30, 40, 50, 60, 70, 80, 90]

       console.log(result3); // -> (4) [6, 7, 8, 9] */

       /* let ary = [
           {s: true,name: 'ws'},
           {s: true,name: 'ws'},
           {s: true,name: 'ws'},
           {s: true,name: 'ws'},
           {s: true,name: 'ws'}
       ];

       let result = ary.every(item=>item.s==true);
       
       console.log(result);
 */

    
        /* let ary = [
            {
                id: 1,
                name: 'ws'
            },
            {
                id: 2,
                name: 'wzr'
            },
            {
                id: 3,
                name: 'hyg'
            },
            {
                id: 4,
                name: 'ai'
            }
        ];

        let result = ary.find(item=>{
            return item.id === 2
        });

        result.name = 'modified';

        console.log(ary); */
        let s = '' + 123;
        console.log(typeof s);
        
        
       
    </script>
</body>
</html>